import Vue from 'vue'
import VueRouter from 'vue-router'
Vue.use(VueRouter)
const routes = [
  {

    path: "/pay",
    component: () => import("../views/Pay.vue")
  },
  { 
  path: "*",
    component: () => import("../views/Home.vue")

  },

  {
    path: "/detail",
    component: () => import("../views/Detail.vue"),

    children: [
      {
        path: "*",
        component: () => import("../views/Evaluate.vue")
      },
      {
        path: "evaluate",
        component: () => import("../views/Evaluate.vue")
      }
    ]

  },
  {
    mode: "history",
    path: "/a",
    component: () => import("../views/A.vue")
  },
  {
    mode: "history",
    path: "/b",
    component: () => import("../views/B.vue")
  },
  {
    path: "/home",
    component: () => import("../views/Home.vue")
  },
  {
    path: "/classify",
    component: () => import("../views/Classify.vue")
  },
  {
    path: "/shop",
    component: () => import("../views/Shop.vue")
  },
  {
    path: "/my",
    component: () => import("../views/My.vue")
  },
]

const router = new VueRouter({
  routes,
  mode: 'history',
})

export default router
